//
//  HeadCollectionViewCell.m
//  Project_B
//
//  Created by 张闯的mac pro on 15/12/4.
//  Copyright © 2015年 张闯. All rights reserved.
//

#import "HeadCollectionViewCell.h"
#import "UIImageView+WebCache.h"
#import "FirstModel.h"

@interface HeadCollectionViewCell ()

@property (nonatomic ,retain) UIImageView *images;

@end


@implementation HeadCollectionViewCell

#pragma mark - 初始化
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.images = [[UIImageView alloc] init];
        
        [self.contentView addSubview:self.images];
    }
    return self;
}
#pragma mark - 布局
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.images.frame = CGRectMake(0, 0, self.contentView.frame.size.width, 200);
}
#pragma makr - 赋值
- (void)setModel:(FirstModel *)model
{
    if (_model != model) {
        _model = model;
    }
    [self.images sd_setImageWithURL:[NSURL URLWithString:model.images] placeholderImage:[UIImage imageNamed:@"zhanwei"]];
}


@end
